package com.example.demo.dao;

import com.example.demo.model.Articleinfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ArticleMapper {
    @Select("select * from articleinfo")
    List<Articleinfo> getAlls();

    @Select("select u.username,u.password,a.* from articleinfo a right join userinfo u on a.id=u.id")
    List<Articleinfo> getAll1();

    @Select("select * from articleinfo where title like concat('%',#{title},'%')")
    List<Articleinfo> gets(@Param("title")String title);
}
